package com.bnz.page.controller;

import com.bnz.common.entity.R;
import com.bnz.page.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
@RequestMapping
public class PageController {
	@Autowired
	private GoodsService goodsService;
	//1. 根据id生成html
	@GetMapping("/createHtml")
	public R createHtml(String goodsId) throws IOException {
		goodsService.createHtml(goodsId);
		return R.ok();
	}
}